import 'package:flutter/material.dart';

class CustomAppBar extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    double autoMarginTop = MediaQuery.of(context).padding.top + 10;
    return Container(
      margin: EdgeInsets.fromLTRB(15, autoMarginTop, 15, 5),
      height: 40,
      padding: EdgeInsets.fromLTRB(20, 4, 25, 4),
      decoration: BoxDecoration(borderRadius: new BorderRadius.circular(20), color: Colors.white70),
      child: Row(
        children: <Widget>[
         new Padding(padding: EdgeInsets.only(right: 8),
         child:  new Icon(
           Icons.search,
           color: Colors.black45,
         )),
          new Expanded(child: new Text("长安十二时辰", style: new TextStyle(fontSize: 15, color: Colors.black45))),
          new Container(width: 1,height: 18,color:  Colors.black45,margin: EdgeInsets.only(right: 5,left: 5),),
          new Text("书城",style: new TextStyle(fontSize: 15),)
        ],
      ),
    );
  }
}
